import request from '@/utils/request'

// 查询活动发布列表
export function listActivity(query) {
  return request({
    url: '/wlxz/activity/list',
    method: 'get',
    params: query
  })
}

// 查询活动发布详细
export function getActivity(activityId) {
  return request({
    url: '/wlxz/activity/' + activityId,
    method: 'get'
  })
}

// 新增活动发布
export function addActivity(data) {
  return request({
    url: '/wlxz/activity',
    method: 'post',
    data: data
  })
}

// 修改活动发布
export function updateActivity(data) {
  return request({
    url: '/wlxz/activity',
    method: 'put',
    data: data
  })
}

// 删除活动发布
export function delActivity(activityId) {
  return request({
    url: '/wlxz/activity/' + activityId,
    method: 'delete'
  })
}

//根据id查询报名的学生姓名和学号
export function getStudentNameAndId(query) {
  return request({
    url: '/wlxz/stupublic/list',
    method: 'get',
    params: query
  })
}
